package com.zat.mes.andrmes.dofun.work.adapter

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.zat.mes.andrmes.base.BaseFragment

/**
 * @author zy
 * @date :2020-02-25 19:46
 * @description:首页fragment adapter
 */
class VpFragmentAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {

    var listFragment: MutableList<BaseFragment> = ArrayList()

    override fun getItemCount(): Int {
        return listFragment.size
    }

    override fun createFragment(position: Int): Fragment {

        return listFragment.get(position)
    }
}